Kafka: The Definitive Guide: Real-Time Data and Stream Processing at Scale by Neha Narkhede & Gwen Shapira & Todd Palino
Author:Neha Narkhede & Gwen Shapira & Todd Palino [Narkhede, Neha]
Language: eng
Format: azw3, epub
Publisher: O'Reilly Media
Published: 2017-08-31T04:00:00+00:00
Offset management
Offset management is one of the convenient services the workers perform for the connectors (in addition to deployment and configuration management via the REST API). The idea is that connectors need to know which data they have already processed, and they can use APIs provided by Kafka to maintain information on which events were already processed.
For source connectors, this means that the records the connector returns to the Connect workers include a logical partition and a logical offset. Those are not Kafka partitions and Kafka offsets, but rather partitions and offsets as needed in the source system. For example, in the file source, a partition can be a file and an offset can be a line number or character number in the file. In a JDBC source, a partition can be a database table and the offset can be an ID of a record in the table. One of the most important design decisions involved in writing a source connector is deciding on a good way to partition the data in the source system and to track offsets — this will impact the level of parallelism the connector can achieve and whether it can deliver at-least-once or exactly-once semantics.
When the source connector returns a list of records, which includes the source partition and offset for each record, the worker sends the records to Kafka brokers. If the brokers successfully acknowledge the records, the worker then stores the offsets of the records it sent to Kafka. The storage mechanism is pluggable and is usually a Kafka topic. This allows connectors to start processing events from the most recently stored offset after a restart or a crash.
Sink connectors have an opposite but similar workflow: they read Kafka records, which already have a topic, partition, and offset identifiers. Then they call the connector put() method that should store those records in the destination system. If the connector reports success, they commit the offsets they’ve given to the connector back to Kafka, using the usual consumer commit methods.
Offset tracking provided by the framework itself should make it easier for developers to write connectors and guarantee some level of consistent behavior when using different connectors.
Download
Kafka: The Definitive Guide: Real-Time Data and Stream Processing at Scale by Neha Narkhede & Gwen Shapira & Todd Palino.epub
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8310)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6821)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6801)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6686)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6473)
Driving Data Quality with Data Contracts by Andrew Jones(6424)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6175)
Learning SQL by Alan Beaulieu(6006)
Weapons of Math Destruction by Cathy O'Neil(5798)
Big Data Analysis with Python by Ivan Marin(5404)
Data Engineering with dbt by Roberto Zagni(4412)
Solidity Programming Essentials by Ritesh Modi(4058)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3919)
Pandas Cookbook by Theodore Petrou(3623)
Blockchain Basics by Daniel Drescher(3308)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2914)
Feature Store for Machine Learning by Jayanth Kumar M J(2822)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2803)
Mastering Python for Finance by Unknown(2748)
